<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>爬虫管理中心</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css" rel="stylesheet">
    <style>
        body {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .spider-card {
            transition: all 0.3s ease;
            cursor: pointer;
            border: none;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        .spider-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 12px 20px rgba(0,0,0,0.2);
        }
        .container-main {
            max-width: 1200px;
        }
        .header-title {
            color: white;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }
    </style>
</head>
<body>
    <div class="container container-main">
        <!-- 页面标题 -->
        <div class="row mb-5">
            <div class="col-12 text-center">
                <h1 class="header-title display-3 mb-3">
                    <i class="bi bi-robot"></i> 爬虫管理中心
                </h1>
                <p class="text-white lead">选择一个爬虫开始管理</p>
            </div>
        </div>

        <!-- 爬虫列表 -->
        <div class="row g-4">
            {% for spider in spiders %}
            <div class="col-md-6 col-lg-4">
                <a href="/{{ spider }}/" class="text-decoration-none">
                    <div class="card spider-card h-100">
                        <div class="card-body text-center p-5">
                            <div class="mb-4">
                                <i class="bi bi-globe2 text-primary" style="font-size: 4rem;"></i>
                            </div>
                            <h3 class="card-title text-capitalize mb-3">{{ spider }}</h3>
                            <p class="card-text text-muted">
                                <i class="bi bi-arrow-right-circle"></i> 点击进入管理页面
                            </p>
                            <div class="mt-4">
                                <span class="badge bg-primary">实时监控</span>
                                <span class="badge bg-success">任务管理</span>
                                <span class="badge bg-info">数据导出</span>
                            </div>
                        </div>
                    </div>
                </a>
            </div>
            {% endfor %}
        </div>

        <!-- 底部信息 -->
        <div class="row mt-5">
            <div class="col-12 text-center">
                <p class="text-white-50">
                    <i class="bi bi-info-circle"></i> 
                    当前支持 {{ spiders|length }} 个爬虫
                </p>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

